/**
 * Filename: YNDoSecretUtils.java
 * @author  Firefly
 * @contact postfirefly@163.com
 * @time    2016/3/17 16:09
 */
package com.github.postsanf.yinian.utils;


public class YNDoSecretUtils {
	public static final YNDESUtil des = new YNDESUtil("yinianer");//自定义密钥

	// 字符串加密算法
	public static String doSecretStr(String str){
		String mw = null;
		try {
			mw= des.encrypt(str);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return  mw;
	}

	// 字符串解密算法
	public static String getSecretStr(String str){
		String mw = null;
		try {
			mw =  des.decrypt(str);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return  mw;
	}
}
